<!-- 上传文件模态框 -->
<div class="modal fade" id="uploadModal" tabindex="-1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <h5 class="modal-title">上传文档文件</h5>
                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
            </div>
            <div class="modal-body">
                <form id="uploadForm">
                    <div class="mb-3">
                        <label for="jsonFile" class="form-label">选择文件</label>
                        <input class="form-control" type="file" id="jsonFile" accept=".json,.epub,.txt,.md" required>
                        <div class="form-text">
                            支持以下格式:
                            <ul class="mt-2">
                                <li><strong>JSON</strong> - 包含文档对象数组，每个对象必须包含text和source字段</li>
                                <li><strong>EPUB</strong> - 电子书格式，将被自动分割成多个文档片段</li>
                                <li><strong>TXT</strong> - 文本文件，将被自动分割成多个文档片段</li>
                                <li><strong>MD</strong> - Markdown文件，将被自动分割成多个文档片段</li>
                            </ul>
                        </div>
                    </div>
                </form>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary" id="uploadBtn">上传</button>
            </div>
        </div>
    </div>
</div> 